//**************************************************************************
//   CoinFlip.java        Author: 20172330
//
//   Demonstrates the use of an if-else statement.
//**************************************************************************

public class pp66
{
    //----------------------------------------------------------------------
    //   Creates a Coin object, flips it, and prints the results.
    //----------------------------------------------------------------------
    public static void main(String[] args)
    {  
       int a=0,b=0,c=0;
       Coin myCoin = new Coin();
 
       for(int i=1;i <= 100; i++)
       {
       myCoin.flip();

          if (myCoin.isHeads())
          {
              a++;
              c++;
          }
          else 
          {
              b++;
              c++;
          }
       }
       System.out.println("up：" + a);
       System.out.println("down：" + b);
       System.out.println("All：" + c);
    }
}

